import http from '../utils/request'

export function fetchCreateOrder(params) {
  return http.post('/app-api/cake/order/createOrder', params);
}

export function fetchPayOrder(orderId: string) {
  return http.get(`/app-api/cake/order/payOrder`, {
    orderId
  });
}

export function fetchRuleId(cityId: string, productId: string) {
  return http.get(`/app-api/cake/product/get_rule_ids`, {
    city_id: cityId,
    product_id: productId,
  });
}

export function fetchOrderList(params) {
  return http.get('/app-api/cake/order/orderList', params);
}

export function fetchOrderDetail(orderId) {
  return http.get('/app-api/cake/order/orderDetail', {
    orderId
  });
}
